SqlMapper.StringTypeHandler<T>
Base-class for simple type-handlers that are based around strings
Assembly: ServiceStack.OrmLite.dll
View Source
Declaration
public abstract class StringTypeHandler<T> : SqlMapper.TypeHandler<T>, SqlMapper.ITypeHandler
Methods
Parse(String)
Parse a string into the expected type (the string will never be null)
View Source
Declaration
protected abstract T Parse(string xml)
Returns
<T>
Parameters
Type | Name | Description |
---|---|---|
System.String | xml | The string to parse. |
|
Format(T)
Format an instace into a string (the instance will never be null)
View Source
Declaration
protected abstract string Format(T xml)
Returns
System.String
Parameters
Type | Name | Description |
---|---|---|
<T> | xml | The string to format. |
|
SetValue(IDbDataParameter, T)
Assign the value of a parameter before a command executes
View Source
Declaration
public override void SetValue(IDbDataParameter parameter, T value)
Parameters
Type | Name | Description |
---|---|---|
IDbDataParameter | parameter | The parameter to configure |
|
| <T>
| value | Parameter value
|
Parse(Object)
Parse a database value back to a typed value
View Source
Declaration
public override T Parse(object value)
Returns
<T>
: The typed value
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value from the database |
|